package com.pj.wisdomlogistics.ui.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.pj.wisdomlogistics.ui.fragment.FragmentFactory;


public class CarPagerAdapter extends FragmentPagerAdapter {

    private String[] TITLES = {
            "车辆车型", "选择司机"
    };

    public CarPagerAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        return FragmentFactory.createForCar(position);
    }

    @Override
    public int getCount() {
        return 2;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return TITLES[position];
    }
}
